package com.wtpaint.design.creational.singleton;


public class HungrySingleton {
    private final static HungrySingleton singleton;

    static {
        singleton = new HungrySingleton();
    }

    private HungrySingleton() {
        if (null != singleton) {
            throw new RuntimeException("singleton can not be invoke");
        }
    }

    public HungrySingleton getInstance() {
        return singleton;
    }
}
